<!-- Carousel -->
<div id="demo" class="carousel slide mt-3 shadow-sm " data-bs-ride="carousel">

  <!-- Indicators/dots -->
  <div class="carousel-indicators">
    <button type="button" data-bs-target="#demo" data-bs-slide-to="0" class="active"></button>
    <button type="button" data-bs-target="#demo" data-bs-slide-to="1"></button>
    <button type="button" data-bs-target="#demo" data-bs-slide-to="2"></button>
  </div>
  
  <!-- The slideshow/carousel -->
  <div class="carousel-inner">

    <?php 
    $sticky = get_option('sticky_posts');
    rsort( $sticky );
    $sticky = array_slice( $sticky, 0, 3);
    query_posts( array( 
      'post__in' => $sticky, 
      'caller_get_posts' => 1 
    ) );
    $query_index = 0; while (have_posts()) : $query_index++;the_post();
    ?>

    <?php if($query_index==1){?>

      <div class="carousel-item active">
        <img src="<?php post_thumbnail_src('show')?>" class="d-block img-fluid  ">
        <div class="carousel-caption">
          <a href="<?php the_permalink(); ?>" target="_blank" class="link-light text-decoration-none" ><?php the_title(); ?></a>
          
        </div>
      </div>

    <?php }else{?>

      <div class="carousel-item">
        <img src="<?php post_thumbnail_src('show')?>" class="d-block img-fluid ">
        <div class="carousel-caption">
          <a href="<?php the_permalink(); ?>" target="_blank" class="link-light text-decoration-none"><?php the_title(); ?></a>
          
        </div>
      </div>

    <?php } endwhile; wp_reset_query(); ?>

  </div>

  <!-- Left and right controls/icons -->
  <button class="carousel-control-prev" type="button" data-bs-target="#demo" data-bs-slide="prev">
    <span class="carousel-control-prev-icon"></span>
  </button>
  <button class="carousel-control-next" type="button" data-bs-target="#demo" data-bs-slide="next">
    <span class="carousel-control-next-icon"></span>
  </button>
</div>